package metier.entities;


import java.util.ArrayList;
import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;



@Entity
@DiscriminatorValue(value="abonnement")
public class Abonnement extends StrategiePrix{

	

	private Long prix;
	private Integer nbrPeriode;
	private String periode;
	private Integer nbrMaxVoyage;
	
	
	@OneToMany(mappedBy = "pk.abonnement")
	private List<ClientAbonnement> CABs=new ArrayList<ClientAbonnement>();
	
	
	public List<ClientAbonnement> getCABs() {
		
		return CABs;
	}
	public void setCABs(List<ClientAbonnement> cABs) {
		CABs = cABs;
	}
	public Long getPrix() {
		return prix;
	}
	public void setPrix(Long prix) {
		this.prix = prix;
	}
	public String getPeriode() {
		return periode;
	}
	public void setPeriode(String periode) {
		this.periode = periode;
	}
	public Integer getNbrMaxVoyage() {
		return nbrMaxVoyage;
	}
	public void setNbrMaxVoyage(Integer nbrMaxVoyage) {
		this.nbrMaxVoyage = nbrMaxVoyage;
	}
	
	public Integer getNbrPeriode() {
		return nbrPeriode;
	}
	public void setNbrPeriode(Integer nbrPeriode) {
		this.nbrPeriode = nbrPeriode;
	}
	
	
	public Abonnement(Integer userType, Devise devise, boolean statut,
			Long prix, Integer nbrPeriode, String periode, Integer nbrMaxVoyage) {
		super(userType, devise, statut);
		this.prix = prix;
		this.nbrPeriode = nbrPeriode;
		this.periode = periode;
		this.nbrMaxVoyage = nbrMaxVoyage;
	}
	public Abonnement() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
}
